#include"dao_gl.h"

DaoMethod* Dao_Get_Object_Method( DaoCData *cd, DValue *obj, const char *name )
{
  DaoMethod *meth;
  if( cd == NULL ) return NULL;
  obj->v.object = DaoCData_GetObject( cd );
  if( obj->v.object == NULL ) return NULL;
  obj->t = DAO_OBJECT;
  meth = DaoObject_GetMethod( obj->v.object, name );
  if( meth == NULL ) return NULL;
  if( meth->type != DAO_METAROUTINE && meth->type != DAO_ROUTINE ) return NULL;
  return meth;
}

